package com.baofang.bao.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baofang.bao.entity.Newgenre;
import com.baofang.bao.repository.NewgenreRepository;
@Service
public class NewgenreServiceImpl implements InewgenreService{
@Autowired
private NewgenreRepository newgenreRepository;
	
	public List<Newgenre> getUsers(){
		return newgenreRepository.findAll();
	}
	
	public Newgenre getUserById(Integer id) {
		return newgenreRepository.getOne(id);
	}
	
	public Newgenre saveUser(Newgenre newgenre) {
		return newgenreRepository.saveAndFlush(newgenre);
	}
}
